@cardWidth: 300px;
@cardHeight: @cardWidth;
@cardWidthSmall: @cardWidth;
@cardHeightSmall: 200px;

@titleHeight: 40px;

.tip-of-the-day {
  margin: 10px;
  border: 1px solid #535353;
  flex: 0 1 auto;
  width: 300px;
  height: 250px;
  > * {
    text-align: center;
  }
  &::before {
    content: "Info";
    font-size: 15px;
    margin: 0;
    padding: 3px;
    float: left;
    background-color: @silexlightgrey;
    color: @silexlightergrey;
  }
  a {
    text-decoration: none;
  }
}

.silex-dashboard {
  //////////////////////
  // sections (blank layouts, community templates...)
  //////////////////////
  .pane {
    font-weight: lighter;
    font-size: 13px;
    font-style: normal;
    margin-bottom: 50px;
  }

  //////////////////////
  // recent files list
  //////////////////////
  .top {
    display: flex;
    justify-content: space-between;
    .pane {
      flex: 1 1 auto;
      width: 50%;
    }
    .info-pane {
      .tip-of-the-day;
      .container {
        margin: 40px 20px;
      }
    }
    .open-pane {
      max-width: 520px;
      min-width: 300px;
      margin-right: 10px;
    }
    @media (max-width: 800px) {
      .open-pane {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
      }
      .info-pane {
        display: none;
        margin: 0
      }
    }
  }
  //////////////////////
  // template lists
  //////////////////////
  .pane {
    h3 {
      font-size: 16px;
      margin: 0;
    }
    a {
      color: @silexlightergrey;
      text-decoration: none;
    }
    & > ul.rendered-list {
      display: flex;
      flex-wrap: wrap;
      justify-content: space-between;
      // &.small-items {
      //  justify-content: initial;
      //  li.rendered-item,
        li.silex-blank-templates {
          // width: @cardWidthSmall;
          // height: @cardHeightSmall;
          // flex: initial;
          .thumbnail {
            // width: 100%;
            // height: @cardHeightSmall - @titleHeight;
            // max-width: @cardWidth;
            background-size: initial;
          }
          .ui a {
            display: none;
          }
        // }
      }
    }
    .btn:hover, .list-item:hover {
      background-color: @silexmediumdarkgrey;
    }
    .btn {
      padding: 6px;
      border: 1px solid;
      border-radius: 5px;
      width: 100px;
      text-align: center;
      cursor: pointer;
      display: inline-block;
      margin: 0 5px;
    }
    &.emty-list .clear-btn {
      display: none;
    }
    li {
      list-style: none;
      &.list-item {
        display: block;
        border: 1px solid @silexdarkgrey;
        border-bottom: none;
        box-shadow: inset 0 1px 0 @silexlightgrey;
        padding: 10px;
        cursor: pointer;

        /* display ellipsis at the beginning of the line to truncate */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        direction: rtl;

        .fa {
          padding-right: 10px;
          float: left;
        }
      }
      &.list-item:last-child {
        border-bottom: 1px solid @silexdarkgrey;
      }
      &.rendered-item {
          height: @cardHeight;
          width: @cardWidth;
          flex: 1 0 auto;
          margin: 5px;

          .thumbnail, h2, .ui {
            margin: 0;
          }
          .thumbnail {
            width: 100%;
            height: @cardHeight - @titleHeight;
            cursor: pointer;
            background-position: 50%;
            background-size: contain;
            background-repeat: no-repeat;
            background-color: @silexmediumdarkgrey;
          }
          .ui {
            height: @titleHeight;
            margin: 5px;
            display: flex;
            h3 {
              cursor: pointer;
              flex: 1 1 auto;
              text-overflow: ellipsis;
              overflow: hidden;
            }
            a {
              padding: 5px;
              cursor: pointer;
              opacity: .7;
              &:before {
                padding: 0 5px;
              }
              &:hover {
                opacity: 1;
              }
            }
        }
      }
    }
  }
}
